﻿@using (Html.Bootstrap().Container().Begin())
{
    @Html.Bootstrap().Heading1("With Child")
    using (Html.Bootstrap().Div().SetId("test-with-child").Begin())
    {
        @Html.Bootstrap().GridRow().WithChild().GridColumn(12).AddContent("With Child")
    }
    
    <hr />
    
    @Html.Bootstrap().Heading1("With Child Disposable")
    using (Html.Bootstrap().Div().SetId("test-with-child-disposable").Begin())
    {
        using (Html.Bootstrap().GridRow().WithChild().GridColumn(12).Begin())
        {
            <text>With Child Disposable</text>
        }
    }

    <hr />

    @Html.Bootstrap().Heading1("With Child Nested")
    using (Html.Bootstrap().Div().SetId("test-with-child-nested").Begin())
    {
        using (var row = Html.Bootstrap().Container().WithChild().GridRow().Begin())
        {
            using (row.GridColumn(8).Begin())
            {
                <text>A</text>
            }
            @row.GridColumn(4).AddContent("B")
        }
    }

    <hr />

    @Html.Bootstrap().Heading1("Add Child")
    using (Html.Bootstrap().Div().SetId("test-add-child").Begin())
    {
        @Html.Bootstrap().GridRow().AddChild(x => x.GridColumn(6).AddContent("A")).AddChild(x => x.GridColumn(6).AddContent("B").AddChild(y => Html.Bootstrap().Container()))
    }    
    
    <hr />

    @Html.Bootstrap().Heading1("AddContent adds a component")
    using (Html.Bootstrap().Div().SetId("test-addcontent-adds-component").Begin())
    {
        @Html.Bootstrap().Div().AddContent(Html.Bootstrap().Span("span-component"))
    }
    
    <hr />

    @Html.Bootstrap().Heading1("AddContentAtEnd adds a component")
    using (Html.Bootstrap().Div().SetId("test-addcontentatend-adds-component").Begin())
    {
        @Html.Bootstrap().Div().AddContentAtEnd(Html.Bootstrap().Span("span-component1")).AddContentAtEnd(Html.Bootstrap().Span("span-component2"))
    }
}